//引入mongoose
let mongoose=require('mongoose');
//创建目标集合模型对象
let testsSchema=mongoose.Schema({
    title:String,
    date:String,
    durations:String,
    starttime:String,
    endtime:String,
    form:Number,
    pointId:[{
        type:mongoose.SchemaTypes.ObjectId,
        ref:'pointsModel'
    }],
    exerciseId:[
        {
            type:mongoose.SchemaTypes.ObjectId,
            ref:'exercisesModel'
        }
    ]
});
//建立目标模型对象与目标集合的关联关系
mongoose.model('testsModel',testsSchema,'tests');